/*
 * shoutcast.h
 *
 * Created: 2011-11-19 19:16:50
 *  Author: krzychu
 */ 


#ifndef SHOUTCAST_H_
#define SHOUTCAST_H_

#define SHOUTCAST_SERVPORT		80
#define SHOUTCAST_CLIENTPORT	8001
#define SHOUTCAST_CLIENTPORTb	8000

#define SHOUTCAST_TIMEOUT		10	/* seconds */
#define SHOUTCAST_TRY			3

#define SHOUTCAST_BUFF_MIN		1000
#define SHOUTCAST_BUFF_PLAY		10000

#define SHOUTCAST_CLOSED		0
#define SHOUTCAST_CLOSE			1
#define SHOUTCAST_OPENED		2
#define SHOUTCAST_BUFFER		3
#define SHOUTCAST_HEADER		5
#define SHOUTCAST_OPEN		    4
#define SHOUTCAST_ERROR			9

/*-----------------------------------------*/

void	Shoutcast_Close(void);
void	Shoutcast_Open(byte index);
UINT16	Shoutcast_Data( byte inx, byte *d, UINT16 len, byte *out);
void	Shoutcast_Service(void);
void	Shoutcast_StationName( byte index, char *name);
void	Shoutcast_StationAddr( byte index, IP_addr* ip_addr, UINT16 *port, byte *url);

#endif /* SHOUTCAST_H_ */



//ip_addr.b8[0] = 2;
	//ip_addr.b8[1] = 72;
	//ip_addr.b8[2] = 74;
	//ip_addr.b8[3] = 217;
	
//	port = 60583;